package com.example.enterprise.model

import com.example.enterprise.api.EnterpriseApiService
import com.example.net.RetrofitUtils
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

@Qualifier
@Retention(AnnotationRetention.BINARY)
annotation class Enterprise{

}
@Module
@InstallIn(SingletonComponent::class)
class EnterpriseWorkModel {
    @Enterprise
    @Provides
    @Singleton
    fun provideHouseworkModel(): Retrofit {
        return RetrofitUtils.getRetrofit()
    }
    @Provides
    @Singleton
    fun provideHouseworkApi(@Enterprise retrofit: Retrofit): EnterpriseApiService {
        return  retrofit.create(EnterpriseApiService::class.java)
    }
}